package com.briup.ch07;

import java.util.Arrays;
import java.util.Scanner;

/**
 * @Author briup-adam
 * @Date 2023/10/11 下午4:46
 * @Description
 **/

public class StringDemo {
    public static void main(String[] args) {
//        Scanner sc = new Scanner(System.in);
////        获取输入字符串
//        String next = sc.next();
////        获取字符串长度
//        System.out.println(next.length());
////        获取指定位置上的字符
//        System.out.println(next.charAt(2));
//        int count=0;
//        for (int i = 0; i < next.length(); i++) {
//            char c = next.charAt(i);
////            判断字符是否数字
//            if (c>=48&&c<=57){
//                count++;
//            }
//        }
//        System.out.println("count = " + count);
        String s="helloworld";
        System.out.println(s.substring(3));//loworld
        System.out.println(s.substring(3,5));//lo
        s="my  name is zhangmeina";
        String[] split = s.split("\\ ");
        System.out.println(Arrays.toString(split));
        String s1 = s.replace("zhangmeina", "zhixingyue");
        System.out.println(s1);
//        转大写
        System.out.println(s1.toUpperCase());
//        转小写
        System.out.println("OOOOOOOK".toLowerCase());

    }
}
